import request from '@/utils/request'

//查询商品规格
export const getPageAPI = (pageNum, pageSize) => {
  return request({
    url: `/api/productSpec/page/${pageNum}/${pageSize}`,
    method: 'get',
  })
}

//添加商品规格
export const postSaveAPI = productSpec => {
  return request({
    url: '/api/productSpec/save',
    method: 'post',
    data: productSpec,
  })
}

//修改商品规格
export const putUpdateAPI = productSpec => {
  return request({
    url: '/api/productSpec/update',
    method: 'put',
    data: productSpec,
  })
}

//删除商品规格
export const deleteAPI = id => {
  return request({
    url: `/api/productSpec/delete/${id}`,
    method: 'delete',
  })
}